<template>
  <div class="app-container">
    <div class="searchBox">
      <el-form :inline="true">
        <el-form-item label="查询条件1：">
          <el-input v-model="search.demo1" placeholder="请输入内容"></el-input>
        </el-form-item>
        <el-form-item label="查询条件2：">
          <el-input v-model="search.demo2" placeholder="请输入内容"></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="searchQuery">查询</el-button>
          <el-button type="info" @click="search = {}; searchQuery();">重置</el-button>
        </el-form-item>
      </el-form>
    </div>

    <qm-table
      ref="qmTable"
      :data="query"
      keyProp="oauthId"
      :formValidate="defaultFormValidate"
      isCustomForm
    >
      <qm-table-column field="userId" sortable="true">用户主键</qm-table-column>
      <qm-table-column field="loginId" sortable="true">登录账号</qm-table-column>
      <qm-table-column field="appId" sortable="true">APPID</qm-table-column>
      <qm-table-column field="appName" sortable="true">APP名称</qm-table-column>
      <qm-table-column field="oauthType" sortable="true">第三方类型</qm-table-column>
      <qm-table-column field="expiresIn" sortable="true">过期时间</qm-table-column>

      <template v-slot:form="{ models, controlData, pageAction }">
        <create ref="create" :models="models" :controlData="controlData" :pageAction="pageAction"></create>
      </template>
    </qm-table>
  </div>
</template>

<script>
import Controller from "@/libs/framework/controller";
import Create from "./create";
export default class Instance extends Controller {
  onBeforeInit() {
    this.urls = {
      model: "/mobile/mobileOauth/getListModel",
      query: "/mobile/mobileOauth/query",
      save: "/mobile/mobileOauth/save",
      delete: "/mobile/mobileOauth/delete",
      entity: "/mobile/mobileOauth/getEntity",
    };
  }

  mixin() {
    return {
      components: {
        Create,
      },
      data() {
        return {};
      },
      methods: {},
    };
  }
}
</script>

<style scoped lang="scss">
</style>
